add privileged (dom0) kernel feature indication
authorJan Beulich <jbeulich@novell.com>
Sat, 23 Jul 2011 07:49:15 +0000 (08:49 +0100)
committerJan Beulich <jbeulich@novell.com>
Sat, 23 Jul 2011 07:49:15 +0000 (08:49 +0100)
commitec029aaa9a79965f83476808e32b8573891aa79c
tree8f7a0d56b7a3869f0bf7d42e165f8b7d72f3371e
parent173b4afb894a248ade34bfd38850214f82d657c3
add privileged (dom0) kernel feature indication

With our switching away from supporting 32-bit Dom0 operation, users
complained that attempts (perhaps due to lack of knowledge of that
change) to boot the no longer privileged kernel in Dom0 resulted in
apparently silent failure. To make the mismatch explicit and visible,
add dom0 feature flag that the kernel can set to indicate operation as
dom0 is supported.

Due to the way elf_xen_parse_features() worked up to now (getting
fixed here), adding features indications to the old, string based ELF
note would make the respective kernel unusable on older hypervisors.
For that reason, a new ELF Note is being introduced that allows
specifying supported features as a bit array instead (with features
unknown to the hypervisor simply ignored, as now also done by
elf_xen_parse_features(), whereas here unknown kernel-required
features still keep the kernel [and hence VM] from booting).

Introduce and use elf_note_numeric_array() to be forward
compatible (or else an old hypervisor wouldn't be able to parse kernel
specified features occupying more than 64 bits - thanks, Ian!).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
tools/libxc/xc_dom_elfloader.c
xen/arch/ia64/xen/domain.c
xen/arch/x86/domain_build.c
xen/common/kernel.c
xen/common/libelf/libelf-dominfo.c
xen/common/libelf/libelf-tools.c
xen/include/public/elfnote.h
xen/include/public/features.h
xen/include/xen/libelf.h